import React, { Component } from 'react';
import {NavBar} from 'antd-mobile'

class Search extends Component {
    back(){
        this.props.history.goBack();
    }
    render() {
        //获取动态路由参数, 刷新页面,参数不会丢失
        // console.log( this.props.match.params );
        //获取query路由参数, 刷新页面, 参数会丢失(不可靠)
        // console.log( this.props.location.query );
        //获取state路由参数, 刷新页面,参数不会丢失
        console.log( this.props.location.state );

        return (
            <div className='search'>
                <NavBar onBack={()=>{ this.back() }}>搜索</NavBar>
            </div>
        );
    }
}

export default Search;